//
//  JJTitleButton.swift
//  Weibo
//
//  Created by Adobe on 15/9/27.
//  Copyright © 2015年 龚巨军. All rights reserved.
//

import UIKit

class JJTitleButton: UIButton {
    
    override  init(frame: CGRect) {
        super.init(frame: frame)
        
        setTitleColor(UIColor.grayColor(), forState: UIControlState.Normal)
        
        sizeToFit()
        
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        titleLabel?.frame.origin.x = 0
        
        imageView?.frame.origin.x = titleLabel!.bounds.width
        
    }
    
}
